﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace wpf
{
    /// <summary>
    /// Логика взаимодействия для MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //button1.Content = "qqq";

            Button b2 = new Button();
            b2.Name = "button2";
            b2.Content = "But2";
            b2.Width = 90;
            b2.Height = 30;     
            grid1.Children.Add(b2);
            Grid.SetColumn(b2, 2);
            Grid.SetRow(b2, 2);
        }
    }
}
